﻿@model PagedList.IPagedList<VietPremier.Models.TravelCity>
@{
    ViewBag.Title = "Search";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="content container-fluid">
    <div class="row-fluid">
        <div class="span3">       
            @Html.Action("LeftMenu", "Home")
            <!--/ .box-->
            @Html.Action("Onlinesupport","Home")
            <!--/ .support-->
            @Html.Action("Spotlight","Home")
            <!--/ .box-->
            @Html.Action("News_Event","Home")
            <!--/ .box-->
        </div>
        <!--/ .span3-->
        <div class="span9">

            <div class="box-about">
                <h5>@ViewBag.CountryName</h5>
                <div class="vietnam">
                    <h5>@ViewBag.StyleName</h5>
                    <div class="row-fluid">
                    @if(Model.Count()>0)    
                    {
                    <div class="span6 wheretosay">   
                            @for (int i = 0; i < @Model.Count(); i += 2)
                            {                                      
                            <div class="it">
                            <div class="img">
                                <div class="img-inner">
                                <a href="@Url.Action("City", "TravelInformation", new { title = Utilities.Encode(@Model[i].Name), country = Utilities.Encode(@Model[i].ProductName) })"> 
                                    @{
                                        var imageFile = "~/Content/upload/destination/";
                                        if (@Model[i].Image != null)
                                        {
                                            imageFile +=@Model[i].Image;
                                        }
                                        else
                                        {
                                            imageFile += "no-photo.jpg";
                                        }
                                        

                                        <img src= "@Url.Content(imageFile)" style="width:100px; height:100px" alt="" />
                                    }

                                </a>
                                </div>
                            </div>
                            <h4><a class="title" href="@Url.Action("City", "TravelInformation", new { title = Utilities.Encode(@Model[i].Name), country = Utilities.Encode(@Model[i].ProductName) })">@Model[i].Name</a></h4>
                            <small class="price">Price: @Model[i].Price</small>
                            <small class="tripcode">Duration: @Model[i].Time</small>
                            <small class="journey">@Model[i].Duration</small>
                        </div><!--/ .it-->                                                                
                                           
                            }                                   
                                   
                    </div> <!--/ .span6--> 
                        <div class="span6 wheretosay">   
                            @for (int i = 1; i < @Model.Count(); i += 2)
                            {                                      
                            <div class="it">
                            <div class="img">
                                <div class="img-inner">
                                <a href="#"> 
                                    @{
                                        var imageFile = "~/Content/upload/destination/";
                                        if (@Model[i].Image != null)
                                        {
                                            imageFile +=@Model[i].Image;
                                        }
                                        else
                                        {
                                            imageFile += "no-photo.jpg";
                                        }
                                        

                                        <img src= "@Url.Content(imageFile)" style="width:100px; height:100px" alt="" />
                                    }

                                </a>
                                </div>
                            </div>
                            <h4><a class="title" href="@Url.Action("City", "TravelInformation", new { title = Utilities.Encode(@Model[i].Name), country = Utilities.Encode(@Model[i].ProductName) })">@Model[i].Name</a></h4>
                            <small class="price">Price: @Model[i].Price</small>
                            <small class="tripcode">Duration: @Model[i].Time</small>
                            <small class="journey">@Model[i].Duration</small>
                        </div><!--/ .it-->                                                                
                                           
                            }                                   
                                   
                    </div> <!--/ .span6-->
                    }
                  
                    <div class="pagination pagination-centered">
                  
                            <p class="pull_right">Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
                            of @Model.PageCount Items</p>
                    <ul>
                      
                        @for (int i = 1; i <= Model.PageCount; i++)
                        {
                            if (i == Model.PageNumber)
                            {
                                <li class="active"><a href="#">@i</a></li>
                            }
                            else
                            {
                                <li><a id="page-number" href="@Url.Action("Search", "TravelInformation", new { ViewBag.idProduct, ViewBag.idStyle, ViewBag.Time, page = i })">@i</a></li>
                            }
                        }
                  
                    </ul>
                </div>
                </div>
            <!--/ .box-about-->
        </div>
    </div>
    <!--/ .row-fluid-->
  
</div>
<!--/.container-fluid -->
